package com.vogue.supplymall.match.domain.service;

import java.util.List;
import java.util.Map;

import com.vogue.supplymall.match.domain.dto.BaseDTO;
import com.vogue.supplymall.match.domain.dto.BuyerOrganDTO;
import com.vogue.supplymall.match.domain.dto.EnterpriseDTO;
import com.vogue.supplymall.match.domain.dto.OrderPullDTO;
import com.vogue.supplymall.match.domain.dto.OrderPushDTO;
import com.vogue.supplymall.match.domain.dto.PfcrapDTO;
import com.vogue.supplymall.match.domain.dto.ProductCustomerDataDTO;
import com.vogue.supplymall.match.domain.dto.ProductDataDTO;
import com.vogue.supplymall.match.domain.dto.ProductPriceDataDTO;
import com.vogue.supplymall.match.domain.dto.PullShopOfCustomerDTO;
import com.vogue.supplymall.match.domain.dto.SellerOrganDTO;
import com.vogue.supplymall.match.domain.dto.UserDTO;
import com.vogue.supplymall.match.domain.model.MatchOrgan;

public interface ColValidateService extends BaseService<MatchOrgan, Long>{
	/**
	 * 根据code、tel、organCode进行全局安全验证
	 * entFlag是否是保存企业信息时调用，是ture,否 false
	 * @param <T>
	 */
	public <T> List<Map<String, Object>> safetyValidate(BaseDTO<T> baseDTO,boolean entFlag,String checkType);
	
	/**
	 * 企业信息验证
	 */
	public List<Map<String, Object>> enterpriseValidate(BaseDTO<EnterpriseDTO> baseDTO)  throws Exception;
	
	/**
	 * 卖家机构信息验证
	 */
	public List<Map<String, Object>> sellerOrganValidate(BaseDTO<List<SellerOrganDTO>> baseDTO)  throws Exception;
	
	/**
	 * 买家机构信息验证
	 */
	public List<Map<String, Object>> buyerOrganValidate(BaseDTO<BuyerOrganDTO> baseDTO)  throws Exception;
	
	/**
	 *买家信息验证
	 */
	public List<Map<String, Object>> buyerValidate(BaseDTO<List<UserDTO>> baseDTO)  throws Exception;
	
	/**
	 *商品信息验证
	 */
	public List<Map<String, Object>> productValidate(BaseDTO<List<ProductDataDTO>> baseDTO) throws Exception;
	/**
	 *商品对应不同客户的价格的信息验证
	 */
	public List<Map<String, Object>> producPriceValidate(BaseDTO<List<ProductPriceDataDTO>> baseDTO) throws Exception;
	/**
	 *商品与客户对应关系的信息验证
	 */
	public List<Map<String, Object>> productCustomerValidate(BaseDTO<List<ProductCustomerDataDTO>> baseDTO) throws Exception;
	/**
	 *推送订单验证
	 */
	public List<Map<String, Object>> orderPushValidate(BaseDTO<List<OrderPushDTO>> baseDTO) throws Exception;
	/**
	 * 验证日期格式是否正确的方法
	 * 将字符串格式的日期转换为date类型，报异常说明日期格式不正确，返回errList
	 * @return
	 */
	public boolean checkDateFormat(String date);
	/**
	 * 日期格式不正确，返回错误信息</br>
	 * titleName 错误主体名称，可为空</br>
	 * titleId	 错误主体id，可为空</br>
	 * dateName 日期名称</br>
	 * @return
	 */
	public List<Map<String, Object>> dateFormatErrorInfo(List<Map<String, Object>> errList,String titleName,String titleId,String dateName);
	/**
	 * 组装baseDTO，用于安全信息验证
	 */
	public BaseDTO<String> setValueTobaseDTO(String datas) throws org.json.JSONException;
	/**
	 * 装配具体的错误信息
	 */
	public Map<String, Object> setValueForErrMap(String name,String id,List<String> info,String type);
	
	/**
	 * 拉取门店信息验证
	 */
	public List<Map<String, Object>> pullShopOfCustomerValidate(BaseDTO<PullShopOfCustomerDTO> baseDTO)  throws Exception;
	/**
	 * 推送支付信息验证
	 */
	public List<Map<String, Object>> pushCustomerRelationAndPayModeValidate(BaseDTO<PfcrapDTO> baseDTO)  throws Exception;
}
